package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.UserService;
import com.wicket.okrpbff.biz.service.dto.req.BffCancelIsinvalidSetUserIdReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffQueryPersonalInformationDetailReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffQueryPersonalInformationListReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffUpdateIsinvalidSetUserIdReqDto;
import com.wicket.okrpbff.biz.service.dto.res.BffCancelIsinvalidSetUserIdRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryPersonalInformationDetailRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryPersonalInformationListRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffUpdateIsinvalidSetUserIdRespDto;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseUserClient;
import com.wicket.okrframework.integration.dto.QueryPersonalInformationListRespDto;
import com.wicket.okrframework.integration.dto.QueryPersonalInformationListReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffUsersDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.QueryPersonalInformationDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryPersonalInformationDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryUsersUnionDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryUsersUnionDetailReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffUsersUnionDto;
import com.wicket.okrframework.integration.dto.QueryUserInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryUserInfoDetailComReqDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryUserInfoDetailComRespDto;
import com.wicket.okrpbff.common.util.CommonFunctionHelper;
import com.wicket.okrframework.integration.dto.QueryUserInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryUserInfoDetailComReqDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQueryUserInfoDetailComRespDto;
import com.wicket.okrpbff.common.util.CommonFunctionHelper;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "User", tags = {"User"})
@RestController
// @RequestMapping("/poms/user/")
public class UserController {
    @Autowired
    UserService userService;

    /**
   * B1-2查询个人信息列表（平台）
   * gen by moon at 10/18/2022, 10:05:14 PM
   */
    @PostMapping("/oms/platform/user/queryPersonalInformationList")
    @ApiOperation(value = "B1-2查询个人信息列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPersonalInformationListRespDto> queryPersonalInformationList(@RequestBody(required=false) @Validated BffQueryPersonalInformationListReqDto reqDTO){
        return OkrResult.success(userService.queryPersonalInformationList(reqDTO));
    }

    /**
   * B1-2取消失效个人账号（平台）
   * gen by moon at 8/10/2022, 3:39:49 AM
   */
    @PostMapping("/oms/platform/user/cancelIsinvalidSetUserId")
    @ApiOperation(value = "B1-2取消失效个人账号（平台）", response = OkrResult.class)
    public OkrResult<BffCancelIsinvalidSetUserIdRespDto> cancelIsinvalidSetUserId(@RequestBody(required=false) @Validated BffCancelIsinvalidSetUserIdReqDto reqDTO){
        return OkrResult.success(userService.cancelIsinvalidSetUserId(reqDTO));
    }

    /**
   * B1-2设无效个人账号（平台）
   * gen by moon at 8/10/2022, 3:39:48 AM
   */
    @PostMapping("/oms/platform/user/updateIsinvalidSetUserId")
    @ApiOperation(value = "B1-2设无效个人账号（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateIsinvalidSetUserIdRespDto> updateIsinvalidSetUserId(@RequestBody(required=false) @Validated BffUpdateIsinvalidSetUserIdReqDto reqDTO){
        return OkrResult.success(userService.updateIsinvalidSetUserId(reqDTO));
    }

    /**
   * B1-2查询个人信息详情（平台）
   * gen by moon at 10/18/2022, 6:05:41 AM
   */
    @PostMapping("/oms/platform/user/queryPersonalInformationDetail")
    @ApiOperation(value = "B1-2查询个人信息详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryPersonalInformationDetailRespDto> queryPersonalInformationDetail(@RequestBody(required=false) @Validated BffQueryPersonalInformationDetailReqDto reqDTO){
        return OkrResult.success(userService.queryPersonalInformationDetail(reqDTO));
    }
///**
//   * B1查询个人资料详情(公共)
//   * gen by moon at 5/31/2023, 6:28:19 PM
//   */
//    @PostMapping("/oms/user/queryUserInfoDetailCom")
//    @ApiOperation(value = "B1查询个人资料详情(公共)", response = OkrResult.class)
//    public OkrResult<BffQueryUserInfoDetailComRespDto> queryUserInfoDetailCom(@RequestBody(required=false) @Validated BffQueryUserInfoDetailComReqDto reqDTO){
//        return OkrResult.success(userService.queryUserInfoDetailCom(reqDTO));
//    }

}

